<template>
  <div id="newSong">
    <van-swipe-item>
      <van-cell-group>
        <MusicItem
        v-for="item in songData"
        :key="item.id"
        :name="item.name"
        :artists="item.song.artists[0].name"
        :id="item.id"
        :picUrl="item.picUrl"
        :duration="item.song.duration"
        :mvId="item.song.mvid"
         />
      </van-cell-group>
    </van-swipe-item>
  </div>
</template>

<script>
import MusicItem from '@/components/MusicItem'
export default {
  name: 'NewSong',
  props: {
    songData: {
      type: [Array, Object],
      required: true
    }
  },
  data () {
    return {}
  },

  // 定义方法
  methods: {
    // 播放MV
    playVideo () {
      console.log('播放MV')
    },
    // 播放音乐
    playMusic () {}
  },
  components: {
    MusicItem
  }
}
</script>

<style scoped lang="less">
.van-cell__title {
  overflow: hidden;
}
.musicAct {
  width: 40px;
  height: 40px;
  margin-right: 10px;
}
</style>
